package vip.finance.makemoney.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 股票
 * </p>
 *
 * @author yangbin
 * @since 2023-02-21
 */
@Getter
@Setter
@TableName("stock")
public class Stock implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 代码
     */
    @TableField("code")
    private String code;

    /**
     * 交易所
     *
     * @see vip.finance.makemoney.common.StockMarketEnum
     */
    @TableField("market")
    private String market;

    /**
     * 简写
     */
    @TableField("short_code")
    private String shortCode;

    /**
     * 名称
     */
    @TableField("name")
    private String name;

    /**
     * 当前价
     */
    @TableField("current")
    private BigDecimal current;

    /**
     * 当日涨跌幅
     */
    @TableField("pct")
    private BigDecimal pct;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
}
